<template>
	<sysJk :label="'13.消防电话系统组件检查和通话功能测试'" showBack :withoutTop="true" :leftTime="lefttime">
		<template v-slot:content>
			<view class="warp" id="warp" @touchmove.stop="()=>{}">
				<view class="w100" v-if="curnum==0">
					<view class="taskTit">
						{{questions[curnum]}}
					</view>
					<view class="imgview" :style="{height:'calc(100vh - '+tH+'px)'}">
						<image :src="bUrl" style="width:100%;height:100%;position:absolute;top:0;z-index: 0;"></image>
					</view>
					<view class="myCard">
						<view class="cardContent">
							<view class="handleBtn">
								<u-button v-if="examType==1"
									:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'green',color:'#fff',fontSize:'3vh'}"
									@click='explain(0)'>查看解析</u-button>
							</view>
							<view class="btnArea">
								<u-button 
									:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="senda1()">提交</u-button>
								<u-button @click="reset1()"
									:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}">重做</u-button>
								<u-button 										
									:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="back()">返回</u-button>
							</view>


							<view v-if="isa131" id="area131" class="openiv" :style="{ left:a1131left,top:a1131top}">
								<image class="openi" :src="openimg" @tap="openimgview('13-2',132)"></image>
							</view>

							<view v-if="isa132" id="area132c" class="openiv" :style="{ left:a1132cleft,top:a1132ctop}">
								<image class="openi" :src="closeimg" @tap="openimgview('13-1',131)"></image>
							</view>
							<view v-if="isa132" id="area181" class="openiv" :style="{ left:a1132tleft,top:a1132ttop}">
							</view>
							<view v-if="isa132" id="btn1" class="openiv"
								:style="{ left:a131btnl,top:a131btnt,width:a131btnw,height:a131btnh}" @tap="passpr()">
							</view>
							<view v-if="isa132" id="sceen" class="openiv"
								:style="{ left:a13pl,top:a13pt,width:a13pw,height:a13ph}">
								<view v-if="sstate==0" class="rem7">
									<view>{{dfulltxt}}</view>
									<view>{{dtimetxt}}</view>
									<view>系统运行正常</view>

								</view>
								<view v-if="sstate==1" class="rem7">
									<view>{{dfulltxt}}</view>
									<view>{{dtimetxt}}</view>
									<view>系统运行正常</view>
									<view class="rem7 sptxt" :style="{ left:psl,top:pst,width:psw,height:psh}">
										<view>输入密码</view>
										<view>{{passtext}}</view>
									</view>

								</view>
								<view v-if="sstate==2" class="rem7 flexcol " style="color: #000;">
									<view style="text-align: center;">主菜单</view>
									<view class="flexrow">
										<view style="color: #fff;">【自检】</view>
										<view>【设置】</view>
									</view>
									<view class="flexrow">
										<view>
											【查询】
										</view>
										<view>
											【放音】
										</view>
									</view>
								</view>
							</view>
							<view v-if="isa132" id="menu" class="openiv redbg"
								:style="{ left:a13menul,top:a13menut,width:a13menuw,height:a13menuh}"
								@tap="menuclick()">
							</view>
							<!--放音按钮-->
							<view v-if="isa132" id="menu" class="openiv redbg"
								:style="{ left:a13okl,top:a13okt,width:a13okw,height:a13okh}" @tap="soundtest()">
							</view>



							<view v-if="issoud && isa132" id="menu1" class="openiv  "
								:style="{ left:wiconl,top:wicont,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="grayimg"
									:style="{ left:wiconl,top:wicont,width:a13iconw,height:a13iconh}"></image>
							</view>


							<view v-if="issouds && isa132" id="menu2" class="openiv  "
								:style="{ left:a13icon1l,top:a13icon1t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon1l,top:a13icon1t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu3" class="openiv  "
								:style="{ left:a13icon2l,top:a13icon2t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon2l,top:a13icon2t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu4" class="openiv  "
								:style="{ left:a13icon3l,top:a13icon3t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon3l,top:a13icon3t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu5" class="openiv  "
								:style="{ left:a13icon4l,top:a13icon4t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon4l,top:a13icon4t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu6" class="openiv  "
								:style="{ left:a13icon5l,top:a13icon5t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon5l,top:a13icon5t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu7" class="openiv  "
								:style="{ left:a13icon6l,top:a13icon6t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon6l,top:a13icon6t,width:a13iconw,height:a13iconh}"></image>
							</view>



						</view>
					</view>
					<u-mask :show="showFlag" @click="onClickHide">
						<view class="wrapper"
							style="display: flex;align-items: center;justify-content: center;height:100%">
							<view class="block" style="width:200px;height:200px;background: #fff;">12345</view>
						</view>
					</u-mask>
				</view>

				<view class="w100" v-if="curnum==1">
					<view class="taskTit">
						{{questions[curnum]}}
					</view>
					<view class="imgview" :style="{height:'calc(100vh - '+tH+'px)'}">
						<image :src="bUrl" style="width:100%;height:100%;position:absolute;top:0;z-index: 0;"></image>
					</view>
					<view class="myCard">
						<view class="cardContent">


							<view class="answerview">
								<view class="ytitle">请判断消防电话分机的故障状态</view>
								<view>
									<view></view>
									<radio-group @change="aChange2">
										<label class="ritem" v-for="item,index in answer2" :key="index">
											<view>
												<radio :value="item" :checked="da2 === item" :style="{transform:'scale('+heightBl+')'}" />{{item}}
											</view>
										</label>
									</radio-group>
								</view>
							</view>


							<view class="handleBtn">
							
								<u-button v-if="examType==1" 										
									:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'green',color:'#fff',fontSize:'3vh'}"
									@click='explain(1)'>查看解析</u-button>
							</view>
							<view class="btnArea">
								<u-button 										
									:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="senda2()">提交</u-button>
								<u-button  @click="reset2()"
									:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									>重做</u-button>
								<u-button :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="back()">返回</u-button>
							</view>
							<view class="writeBox" id="writeBox" :style="{left:writeBoxLeft,top:writeBoxTop}"
								@tap="showDialog">

							</view>



							<view v-if="isa131" id="area131" class="openiv" :style="{ left:a1131left,top:a1131top}">
								<image class="openi" :src="openimg" @tap="openimgview('13-2',132)"></image>
							</view>

							<view v-if="isa132" id="area132c" class="openiv" :style="{ left:a1132cleft,top:a1132ctop}">
								<image class="openi" :src="closeimg" @tap="openimgview('13-1',131)"></image>
							</view>
							<view v-if="isa132" id="area181" class="openiv" :style="{ left:a1132tleft,top:a1132ttop}">

							</view>

							<view v-if="isa132" id="sceen" class="openiv rem7"
								:style="{ left:a13pl,top:a13pt,width:a13pw,height:a13ph,textAlign:'center'}">
								<view>
									分机号：02 地址：04
								</view>
								<view>
									故障
								</view>
							</view>
							<view v-if="  isa132" id="menu" class="openiv  "
								:style="{ left:a13icon4l,top:a13icon4t,width:a13iconw,height:a13iconh}">
								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon4l,top:a13icon4t,width:a13iconw,height:a13iconh}"></image>
							</view>
						</view>
					</view>
					<u-mask :show="showFlag" @click="onClickHide">
						<view class="wrapper"
							style="display: flex;align-items: center;justify-content: center;height:100%">
							<view class="block" style="width:200px;height:200px;background: #fff;">12345</view>
						</view>
					</u-mask>
				</view>

				<view class="w100" v-if="curnum==2">
					<view class="taskTit">
						{{questions[curnum]}}
					</view>

					<view class="imgview" :style="{height:'calc(100vh - '+tH+'px)'}">
						<image :src="bUrl" style="width:100%;height:100%;position:absolute;top:0;z-index: 0;"></image>
					</view>
					<view class="myCard">
						<view class="cardContent">
							<view class="answerview">
								<view class="ytitle">请使用消防电话总机录音并判断是否自动录音</view>
								<view>
									<view></view>
									<radio-group @change="aChange3">
										<label class="ritem" v-for="item,index in answer3" :key="index">
											<view>
												<radio :value="item" :checked="da3 === item" :style="{transform:'scale('+heightBl+')'}" />{{item}}
											</view>
										</label>
									</radio-group>
								</view>
							</view>
							<view class="handleBtn">
							
								<u-button v-if="examType==1" :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'green',color:'#fff',fontSize:'3vh'}"
									@click='explain(2)'>查看解析</u-button>
							</view>
							<view class="btnArea">
								<u-button :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="senda3()">提交</u-button>
								<u-button @click="reset3()"
									:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									>重做</u-button>
								<u-button :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="back()">返回</u-button>
							</view>


							<view v-if="isa131" id="area131" class="openiv" :style="{ left:a1131left,top:a1131top}">
								<image class="openi" :src="openimg" @tap="openimgview('13-2',132)"></image>
							</view>

							<view v-if="isa132" id="area132c" class="openiv" :style="{ left:a1132cleft,top:a1132ctop}">
								<image class="openi" :src="closeimg" @tap="openimgview('13-1',131)"></image>
							</view>

							<view v-if="isa132" id="area181" class="openiv" :style="{ left:a1132tleft,top:a1132ttop}">

							</view>
							<view v-if="isa132" id="area181" class="openiv"
								:style="{ left:a1132bleft,top:a1132btop,width:a1132bw,height:a1132bh}"
								@tap="openimgview('13-2-1',132)">

							</view>

							<view v-if="isa132" id="area181" class="openiv" :style="{ left:a1132tleft,top:a1132ttop}">
							</view>
							<view v-if="isa132" id="btn1" class="openiv"
								:style="{ left:a131btnl,top:a131btnt,width:a131btnw,height:a131btnh}" @tap="passpr2()">
							</view>


							<view v-if="isa132" id="sceen" class="openiv"
								:style="{ left:a13pl,top:a13pt,width:a13pw,height:a13ph}">
								<view v-if="sstate==0" class="rem7">
									<view>{{dfulltxt}}</view>
									<view>{{dtimetxt}}</view>
									<view>系统运行正常</view>

								</view>
								<view v-if="sstate==1" class="rem7">
									<view>{{dfulltxt}}</view>
									<view>{{dtimetxt}}</view>
									<view>系统运行正常</view>
									<view class="rem7 sptxt" :style="{ left:psl,top:pst,width:psw,height:psh}">
										<view>输入密码</view>
										<view>{{passtext}}</view>
									</view>
								</view>
								<view v-if="sstate==2" class="rem7 flexcol " :style="{height:a13ph,lineHeight:a13ph}">
									<view style="text-align: center;">已准备好请呼叫</view>

								</view>
								<view v-if="sstate==3" class=" flexcol " style="font-size:0.4rem;">
									<view class="flexrow">
										<view>
											通话: 总 0
										</view>
										<view>
											呼入：总 0
										</view>
									</view>
									<view class="flexrow">
										<view>
											呼出:总 0
										</view>
										<view>
											号码输入:1
										</view>
									</view>
								</view>
								<view v-if="sstate==4" class=" flexcol " style="font-size: 0.4rem;">
									<view class="flexrow">
										<view>
											通话: 总 1/1
										</view>
										<view>
											呼入：总 0
										</view>
									</view>
									<view class="flexrow">
										<view>
											呼出:总 1/1
										</view>
										<view>
											号码输入:1
										</view>
									</view>
								</view>
								<view v-if="sstate==5" class="rem7 flexcol " :style="{height:a13ph,lineHeight:a13ph}">

								</view>


							</view>
							<view v-if="isa132" id="menu" class="openiv redbg"
								:style="{ left:a13menul,top:a13menut,width:a13menuw,height:a13menuh}" @tap="">
							</view>

							<!--接通-->
							<view v-if="isa132" id="menu" class="openiv redbg"
								:style="{ left:a13tl,top:a13tt,width:a13tw,height:a13th}" @tap="line()">
							</view>


							<!--挂断 白屏-->
							<view v-if="isa132" id="menu" class="openiv redbg"
								:style="{ left:a13dl,top:a13dt,width:a13dw,height:a13dh}" @tap="unline()">
							</view>

							<!--放音按钮-->
							<view v-if="isa132" id="menu" class="openiv redbg"
								:style="{ left:a13okl,top:a13okt,width:a13okw,height:a13okh}" @tap="soundtest()">
							</view>


							<view v-if="issoud && isa132" id="menu" class="openiv  "
								:style="{ left:a13icon1l,top:a13icon1t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon1l,top:a13icon1t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu" class="openiv  "
								:style="{ left:a13icon2l,top:a13icon2t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon2l,top:a13icon2t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu" class="openiv  "
								:style="{ left:a13icon3l,top:a13icon3t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon3l,top:a13icon3t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu" class="openiv  "
								:style="{ left:a13icon4l,top:a13icon4t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon4l,top:a13icon4t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu" class="openiv  "
								:style="{ left:a13icon5l,top:a13icon5t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon5l,top:a13icon5t,width:a13iconw,height:a13iconh}"></image>
							</view>
							<view v-if="issoud && isa132" id="menu" class="openiv  "
								:style="{ left:a13icon6l,top:a13icon6t,width:a13iconw,height:a13iconh}">

								<image class="openi openiv" :src="greenimg"
									:style="{ left:a13icon6l,top:a13icon6t,width:a13iconw,height:a13iconh}"></image>
							</view> 
						</view>
					</view>
					<u-mask :show="showFlag" @click="onClickHide">
						<view class="wrapper"
							style="display: flex;align-items: center;justify-content: center;height:100%">
							<view class="block" style="width:200px;height:200px;background: #fff;">12345</view>
						</view>
					</u-mask>

				</view>
				<u-mask :show="isexplain" @click="closeex" >
					<view class="wrapper" style="display: flex;align-items: center;justify-content: center;height:100%">
						<view class="block"
							style="width:400rpx;padding: 20rpx;box-sizing:border-box;background: #fff;font-size:2vh">
							<view class="overtitle" style="color: #000;">
								【试题解析】 正确答案
							</view>
							<view class="overtitle" style="color: #000;">
								<text>{{explaintext}}</text>
							</view>
						</view>
					</view>
				</u-mask>
			</view>
		</template>
	</sysJk>

</template>


<script>
	import sysJk from '@/components/sysJk.vue'
	import {
		fzQuestion
	} from '@/globalApi/requestApi.js'
	import {
		formatTime
	} from '@/util/index.js'
	export default {
		components: {
			sysJk
		},

		data() {
			const app = getApp();
			const baseUrl = app.globalData.requestUrl;

			return {
				widthBl:0,
				heightBl:0,
				lefttime: '300',


				dfulltxt: '',
				dtimetxt: '',


				examId: '',
				examType: 1,
				base: baseUrl,
				writeBox: null,
				writeBoxLeft: 0,
				writeBoxTop: 0,
				showFlag: false,
				bUrl: baseUrl + "/static/image/wb/13-1.jpg",
				openimg: baseUrl + "/static/image/open.png",
				closeimg: baseUrl + "/static/image/close.png",
				questionsnum: 3, //题目数
				greenimg: baseUrl + "/static/image/green.png",
				grayimg: baseUrl + "/static/image/back.png",
				curnum: 0, //当前题目

				questions: ['【1/3】请通过消防电话总机测试自检功能（密码11111）',
					'【2/3】请判断消防电话分机是否处于故障状态',
					'【3/3】请通过消防电话总机呼叫消防电话分机(分机号:1 消防电话密码:11111),判断消防电话总机是否自动录音',
				],

				answer2: ['分机处于正常状态', '01分机处于故障状态', '02分机处于故障状态'],

				answer3: ['未自动录音，录音满', '正常自动录音'],


				da2: "",
				da3: "",

				isa131: true,
				isa132: false,

				//测试放音
				issoud: false,
				issouds: false, //第一个闪

				isa1321: false,

				sstate: 0, //屏状态 0,正常，1输mi,2 菜单
				passtext: '', //密码字符
				ck1: false, //是否自检
				//1
				//131 

				a1131left: 0, // 	1060
				a1131top: 0, //  580   //to 132


				//13-2

				a1132cleft: 0, // 	1650
				a1132ctop: 0, //  130   //to 131

				a1132tleft: 0, // 	 1105
				a1132ttop: 0, //  215  //写字



				//22222222222222

				//13-5
				a1133left: 0, // 	1060
				a1133top: 0, //  580   //to 136


				//13-6

				a1136cleft: 0, // 	1650
				a1136ctop: 0, //  130   //to 135


				a1136tleft: 0, // 	 1105
				a1136tleft: 0, //  215  //写字

				////3333

				//13-5
				a1133left: 0, // 	1060
				a1133top: 0, //   580   //to 132

				//132
				a1132cleft: 0, // 	1650
				a1132ctop: 0, //  130   //to 131

				// a1132tleft  :0, // 	 1105
				// a1132ttop	 :0, //  215  //写字

				a1132bleft: 0, // 	480
				a1132btop: 0, //   210   //to 132-1
				a1132bw: 0, // 	468
				a1132bh: 0, // 	138


				//132-1

				a1132bleft: 0, // 	480
				a1132btop: 0, //   210   //to 132 
				a1132bw: 0, // 	468
				a1132bh: 0, // 	138


				//盖子
				a13gail: 484,
				a13gailt: 128,
				a13gailw: 476,
				a13gailh: 146,
				//屏
				a13pl: 1170,
				a13pt: 114,
				a13pw: 168,
				a13ph: 104,

				psl: 0,
				pst: -25,
				psw: 168,
				psh: 80,

				//三个绿图标
				a13icon1l: 1425,
				a13icon1t: 99,

				a13icon2l: 1464,
				a13icon2t: 99,

				a13icon3l: 1424,
				a13icon3t: 141,

				a13iconw: 15,
				a13iconh: 15,


				//1按钮
				a131btnl: 1416,
				a131btnt: 185,
				a131btnw: 36,
				a131btnh: 43,

				//菜单
				a13menul: 1234,
				a13menut: 338,
				a13menuw: 42,
				a13menuh: 34,

				//确认放音
				a13okl: 1226,
				a13okt: 280,
				a13okw: 42,
				a13okh: 34,
				// 另外三个按钮
				a13icon4l: 1500,
				a13icon4t: 99,

				a13icon5l: 1482,
				a13icon5t: 141,
				a13icon6l: 1541,
				a13icon6t: 141,

				//工作
				wiconl: 1540,
				wicont: 98,


				//接通
				a13tl: 1417,
				a13tt: 340,
				a13tw: 34,
				a13th: 34,

				//挂断
				a13dl: 1533,
				a13dt: 340,
				a13dw: 34,
				a13dh: 34,






				innerAudioContext: uni.createInnerAudioContext(),
				jb: baseUrl + "/static/image/jb.MP3",
				quest: {
					fz_id: 2,
					title: '',
					no: "",
					question_type: 1,
					user_answer: '',
					answer: '',
					is_correct: '',
					score: '',
					start_time: 0,
					end_time: 0,
					question_answer: ''
				},
				score1: 0,
				score2: 0,
				score3: 0,


				explainarr: ['点菜单 看小屏幕，输入密码。看到有自检两个字。按确定',
					'直接看电话屏幕\r\n\r\n正确答案：02分机处于故障状态',
					'拿电话，解锁密码，按分机号 观察屏幕右边的小灯，是否有录音满，没亮就正常\r\n\r\n正确答案：正常自动录音'
				],
				isexplain: false,
				explaintext: '',
				tH: 0,
			}
		},
		onLoad(options) {
			uni.setScreenBrightness({
				keepScreenOn: true,
				direction: 'landscape',
				success() {
					console.log("a")
				}
			})
			let that = this;
			let df = new Date()
			let m = df.getMonth() + 1
			this.dfulltxt = df.getFullYear() + "/" + m + "/" + df.getDate()

			setInterval(() => {
				let df1 = new Date()
				that.dtimetxt = df1.getHours() + ":" + df1.getMinutes() + ":" + df1.getSeconds()
			}, 1000)

			this.examId = options.examId
			this.examType = options.examType
			// var writeBox = uni.createSelectorQuery().in(this).select('.imgview')
			// writeBox.boundingClientRect(data => {
			// 	this.writeBox = data
			// }).exec()
		},
		onShow() {
			let that = this;
			// uni.getSystemInfo({
			// 	success: function(res) {
			// 		console.log(res)
			// 		// uni.setStorageSync('titleHeight',res.statusBarHeight+capsuleH)
			// 		that.tH = uni.getMenuButtonBoundingClientRect().height + uni
			// 			.getMenuButtonBoundingClientRect().top * 2 + 21
			// 		//that.tH=85 
			// 		that.drawWhiteBox()
			// 	}
			// });
		},
		onReady() {
				  let that = this;
				  // #ifdef MP-WEIXIN
				  uni.getSystemInfo({
				    success: function(res) {
				      console.log(res)
				      // uni.setStorageSync('titleHeight',res.statusBarHeight+capsuleH)
				      that.tH = uni.getMenuButtonBoundingClientRect().height + uni
				          .getMenuButtonBoundingClientRect().top * 2 + 21
				      //that.tH=85
				      that.drawWhiteBox()
				    }
				  });
				  // #endif
				
				 // #ifdef APP-PLUS
				 let sy = uni.getSystemInfoSync()
				 this.pT = sy.statusBarHeight
				 this.tH = sy.statusBarHeight + 51
				 that.drawWhiteBox(this.tH)
				 
				 // #endif
				},
		methods: {
			back() {
				uni.navigateBack()
			},
			explain(id) {
				this.explaintext = this.explainarr[id]
				this.isexplain = true;
			},
			closeex() {
				this.isexplain = false
			},
			aChange2(e) {
				this.da2 = e.detail.value
			},
			aChange3(e) {
				this.da3 = e.detail.value
			},
			reset(){
				this.isa131= true
				this.isa132= false
				
				//测试放音
				this.issoud= false
				this.issouds= false //第一个闪
				
				this.isa1321= false
				
				this.sstate= 0 //屏状态 0,正常，1输mi,2 菜单
				this.passtext= '' //密码字符
				this.ck1= false //是否自检
			},
			reset1() {
				this.reset()
				let that = this

				that.ck1 = false
				that.curnum = 0
				that.isa131 = true
				that.isa132 = false

				that.bUrl = that.base + "/static/image/wb/13-1.jpg"
			},
			reset2() {
				this.reset()
				let that = this
				that.isa131 = true
				that.curnum = 1
				that.sstate = 0
				that.isa132 = false
				that.bUrl = that.base + "/static/image/wb/13-1.jpg"
				that.da2 = ""

			},
			reset3() {
				this.reset()
				let that = this
				that.curnum = 2
				that.isa131 = true
				that.isa132 = false
				that.sstate = 0
				that.bUrl = that.base + "/static/image/wb/13-1.jpg"
				that.da3 = ""

			},
			senda1() {
				//【1/3】请通过消防电话总机测试自检功能（密码11111）【1分】
				let that = this
				if (that.ck1) {
					that.score1 = 1
				}
				this.$showModal2({
					title: '确认提交？'+that.score1,
					// content: '这是一个模态弹窗',
					
				}).then(()=>{
					
							that.isa131 = true
							that.curnum = 1
							that.sstate = 0
							that.isa132 = false
							that.bUrl = that.base + "/static/image/wb/13-1.jpg"
					
						
				});
			},
			senda2() {
				/**
				 * 	【2/3】请判断消防电话分机是否处于故障状态【0.5】
									请判断消防电话分机的故障状态
									分机处于正常状态
									01分机处于故障状态
									02分机处于故障状态
									【三种状态都有可能】
				 */
				let that = this
				if(this.da2=="" ){
					uni.showToast({
						title:'请选择答案',
						icon:'none'
					})
				 return;
				}
				if (that.da2 == "02分机处于故障状态") {
					that.score2 = 0.5
				} else {
					that.score2 = 0
				}
				this.$showModal2({
					title: '确认提交？'+that.score2 ,
					// content: '这是一个模态弹窗',
					
				}).then(()=>{
				
							that.curnum = 2
							that.isa131 = true
							that.isa132 = false
							that.sstate = 0
							that.bUrl = that.base + "/static/image/wb/13-1.jpg"
						
				});

			},
			senda3() {
				/***
				【3/3】请通过消防电话总机呼叫消防电话分机（分机号：1 密码11111），判断消防电话总机是否自动录音【0.5】
				请通过消防电话总机录音，并判断是否自动录音。
				不自动录音，录音满
				正常自动录音
				【两种结果都有可能】
				*/
				let that = this
				if(this.da3=="" ){
					uni.showToast({
						title:'请选择答案',
						icon:'none'
					})
				 return;
				}
				if (that.da3 == "正常自动录音") {
					that.score3 = 0.5
				} else {
					that.score3 = 0
				}
				let ss = that.score1 + that.score2 + that.score3
				this.$showModal2({
					title: '确认提交？'+that.score3 ,
					// content: '这是一个模态弹窗',
					
				}).then(()=>{
				uni.showLoading({})
							fzQuestion(that.quest).then(res => {
								uni.hideLoading()
								let pages = getCurrentPages()
								if(pages.length==4){
									let prevPage = pages[pages.length - 3] 
									prevPage.$vm.status13 = true
									prevPage.$vm.addScore(ss)
									uni.navigateBack()
								}else{
									let prevPage = pages[pages.length - 2]
									prevPage.$vm.status13 = true
									prevPage.$vm.addScore(ss) 
									uni.navigateBack()
								} 
							})
						
				});

				// uni.showToast({
				// 	title:'提交后不可修改',
				// 	success() {
				// 		setTimeout(()=>{uni.navigateBack()},500)

				// 	}
				// })

				/**
				  * 
				  * 	13消防电话系统组件检查和通话功能测试
							 	
									score1
									score2
									score3
									
				  * 
*/
			},

			menuclick() {
				if (this.sstate == 2) {
					this.sstate = 0
				} else {
					this.sstate = 1
					this.passtext = ''
				}

			},
			passpr() {
				this.passtext = this.passtext + '*'
				if (this.passtext == '*****') {
					this.ck1 = true
					this.sstate = 2
				}
			},
			passpr2() {
				if (this.sstate == 1) {
					this.passtext = this.passtext + '*'
					if (this.passtext == '*****') {
						this.ck1 = true
						this.sstate = 2
					}
				} else if (this.sstate == 2) {
					this.sstate = 3
				}
			},
			line() {
				if (this.sstate == 3) {
					this.sstate = 4
				}
			},
			unline() {
				if (this.sstate == 4) {
					this.sstate = 5
				}
			},
			//自检测试
			soundtest() {
				if (this.sstate == 2) {
					this.issoud = true
					this.issouds = true

					setTimeout(() => {
						this.issoud = true
						this.issouds = false
					}, 300)
					setTimeout(() => {
						this.issoud = true
						this.issouds = true

					}, 600)
					setTimeout(() => {
						this.issoud = true
						this.issouds = false

					}, 900)
					setTimeout(() => {
						this.issoud = true
						this.issouds = true

					}, 1200)
					setTimeout(() => {
						this.issoud = false
						this.issouds = false
						this.sstate = 0

					}, 1200)
				}


			},
			openimgview(path, lb) {
				this.isarea = false
				this.isa1area1 = false
				this.isa1area2 = false

				this.bUrl = this.base + "/static/image/wb/" + path + ".jpg";


				if (path == "13-2-1") {
					if (this.sstate == 0) {
						this.passtext = ""
						this.sstate = 1
						this.bUrl = this.base + "/static/image/wb/" + "13-2-1" + ".jpg";
					} else {
						this.bUrl = this.base + "/static/image/wb/" + "13-2" + ".jpg";
						this.sstate = 0
					}

				}
				switch (lb) {
					case 131:
						this.isa131 = true;
						this.isa132 = false;
						break;
					case 132:
						this.isa132 = true;
						this.isa131 = false;
						break;
					case 1321:

						break;
				}
			},
			showDialog() {
				this.showFlag = true
			},
			onClickHide() {
				this.showFlag = false
			},
			drawWhiteBox(statusnum) {
				let that = this
				let warp = uni.createSelectorQuery().in(this).select('.imgview')

				warp.boundingClientRect(data => {
					console.log(that.tH)
					console.log(data)
					console.log(data.width)
					console.log(data.height)
					//有些设备取的是设备高度 data.height


					let widthBl = data.width / 1920
					let sy = uni.getSystemInfoSync()
					let heightBl = 0
					// if (data.height = sy.screenHeight) {
					// 	heightBl = (data.height - that.tH) / 921
					// } else {
					// 	heightBl = (data.height) / 921
					// }
					heightBl = (data.height-that.tH)/921
					that.widthBl=widthBl
					that.heightBl=heightBl
					//131

					that.a1131left = 1060 * widthBl + 'px'
					that.a1131top = 490 * heightBl + statusnum + 'px' //to 132


					//13-2

					that.a1132cleft = 1650 * widthBl + 'px'
					that.a1132ctop = 130 * heightBl + statusnum + 'px' //to 131

					that.a1132tleft = 1105 * widthBl + 'px'
					that.a1132ttop = 215 * heightBl + statusnum + 'px' //写字



					//22222222222222

					//13-5
					that.a1133left = 1060 * widthBl + 'px'
					that.a1133top = 580 * heightBl + statusnum + 'px' //to 136


					//13-6

					that.a1136cleft = 1650 * widthBl + 'px'
					that.a1136ctop = 130 * heightBl + statusnum + 'px' //to 135


					that.a1136tleft = 1105 * widthBl + 'px'
					that.a1136tleft = 215 * heightBl + statusnum + 'px' //写字

					////3333

					//13-5
					that.a1133left = 1060 * widthBl + 'px'
					that.a1133top = 580 * heightBl + statusnum + 'px' //to 132

					//132
					that.a1132cleft = 1650 * widthBl + 'px'
					that.a1132ctop = 130 * heightBl + statusnum + 'px' //to 131

					that.a1132tleft = 1105 * widthBl + 'px'
					that.a1132ttop = 215 * heightBl + statusnum + 'px' //写字

					that.a1132bleft = 480 * widthBl + 'px'
					that.a1132btop = 210 * heightBl + statusnum + 'px' //to 132-1
					that.a1132bw = 468 * widthBl + 'px'
					that.a1132bh = 138 * heightBl + 'px'


					//132-1

					that.a1132bleft = 480 * widthBl + 'px'
					that.a1132btop = 210 * heightBl + statusnum + 'px' //to 132 
					that.a1132bw = 468 * widthBl + 'px'
					that.a1132bh = 138 * heightBl + 'px'





					//盖子
					that.a13gail = 484 * widthBl + 'px'
					that.a13gailt = 128 * heightBl + statusnum + 'px'
					that.a13gailw = 476 * widthBl + 'px'
					that.a13gailh = 146 * heightBl + 'px'
					//屏
					that.a13pl = 1170 * widthBl + 'px'
					that.a13pt = 114 * heightBl + statusnum + 'px'
					that.a13pw = 168 * widthBl + 'px'
					that.a13ph = 104 * heightBl + 'px'


					that.psl = 0 * widthBl + 'px'
					that.pst = -25 * heightBl + 'px'
					that.psw = 168 * widthBl + 'px'
					that.psh = 75 * heightBl + 'px'

					//三个绿图标
					that.a13icon1l = 1425 * widthBl + 'px'
					that.a13icon1t = 99 * heightBl + statusnum + 'px'

					that.a13icon2l = 1464 * widthBl + 'px'
					that.a13icon2t = 99 * heightBl + statusnum + 'px'

					that.a13icon3l = 1424 * widthBl + 'px'
					that.a13icon3t = 141 * heightBl + statusnum + 'px'

					that.a13iconw = 15 * widthBl + 'px'
					that.a13iconh = 15 * heightBl + 'px'



					//1按钮
					that.a131btnl = 1416 * widthBl + 'px'
					that.a131btnt = 185 * heightBl + statusnum + 'px'
					that.a131btnw = 36 * widthBl + 'px'
					that.a131btnh = 43 * heightBl + 'px'

					//菜单
					that.a13menul = 1234 * widthBl + 'px'
					that.a13menut = 338 * heightBl + statusnum + 'px'
					that.a13menuw = 42 * widthBl + 'px'
					that.a13menuh = 34 * heightBl + 'px'

					//接通
					that.a13tl = 1417 * widthBl + 'px'
					that.a13tt = 340 * heightBl + statusnum + 'px'
					that.a13tw = 34 * widthBl + 'px'
					that.a13th = 34 * heightBl + 'px'

					//挂断
					that.a13dl = 1533 * widthBl + 'px'
					that.a13dt = 340 * heightBl + statusnum + 'px'
					that.a13dw = 34 * widthBl + 'px'
					that.a13dh = 34 * heightBl + 'px'


					//确认放音
					that.a13okl = 1226 * widthBl + 'px'
					that.a13okt = 280 * heightBl + statusnum + 'px'
					that.a13okw = 42 * widthBl + 'px'
					that.a13okh = 34 * heightBl + 'px'
					// 另外三个按钮
					that.a13icon4l = 1500 * widthBl + 'px'
					that.a13icon4t = 99 * heightBl + statusnum + 'px'

					that.a13icon5l = 1482 * widthBl + 'px'
					that.a13icon5t = 141 * heightBl + statusnum + 'px'
					that.a13icon6l = 1541 * widthBl + 'px'
					that.a13icon6t = 141 * heightBl + statusnum + 'px'



					that.wiconl = 1540 * widthBl + 'px'
					that.wicont = 98 * heightBl + statusnum + 'px'




				}).exec()

				// uni.getSystemInfo({
				// 	success: function(res) {
				// 		console.log(res)
				// 		

				// 	}
				// });
			}
		}
	}
</script>


<style scoped lang="scss">
	.explaincss {
		padding: 20rpx;
		width: 300rpx;

		border-radius: 20rpx;
		border: 1rpx solid #000;
		background-color: #fff;
		color: #000;
		position: fixed;
		top: 50rpx;
		left: 225rpx;
		z-index: 5000;
	}

	.sptxt {
		position: relative;
		background-color: #888888c2;
		text-align: center;
	}

	.rem7 {
		font-size: 0.5rem;
	}

	.flexcol {
		display: flex;
		flex-direction: column;
	}

	.flexrow {
		display: flex;
		justify-content: space-between;
	}
		.taskTit {
					height: 21px;line-height: 21px;width: 100%;text-align: left;background: #fff;color: #000;font-size: 15px
				}
	.warp {
		height: 100%;
		box-sizing: border-box;
		// padding: 22rpx 33rpx 38rpx 36rpx;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: center;
		background: #F6F6F6;

		.w100 {
			width: 100%;
			height: 100%;
		}

		.openiv {
			position: fixed;
		}

		.openi {
			width: 20px;
			height: 20px;
		}

		.redbg {}

		.answerview {
			position: fixed;
			top: 80rpx;
			left: 40rpx;
			background-color: #ffffff;
			color: #000;
			width: 200rpx;
			font-size: 2vh;
		}

		.ytitle {
			background-color: #ffb700;
			line-height: 26rpx;
		}

		.ritem {
			line-height: 20rpx;
		}


		.imgview {
			position: relative;
			width: 100%;

		}

		.aimg {
			width: 60rpx;
			height: 35rpx;
		}


		.areas {
			background-color: rgba(255, 165, 0, 0.2);
			color: #000;
			font-size: 10px;
			margin-bottom: 10px;
		}

		.sitem {
			border: 2rpx solid orange;
		}

		.areaitem {
			background: #fff;

			display: flex;
			align-items: center;
			justify-content: flex-end;
		}


		.myCard {
			width: 100%;
			// height:100%;
			position: relative;
			// border-radius: 20rpx;
			//overflow: hidden;
			z-index: 1;

			.cardContent {
				// padding: 52rpx 58rpx 37rpx;
				box-sizing: border-box;
				width: 100%;
				height: 100%;
				position: relative;
				z-index: 2;
				color: #fff;

				.moneyContent {
					margin-top: 54rpx;
					width: 100%;
					display: flex;
					align-items: center;

					.moneyDetail {
						width: 50%;
						display: flex;
						flex-direction: column;
						align-items: center;
						justify-content: flex-start;

						.detailTit {
							font-size: 24rpx;
							font-weight: 400;
						}

						.detailVal {
							font-size: 55rpx;
							font-weight: bold;
							margin-top: 35rpx;
						}
					}

				}

				

				.handleBtn {
					position: fixed;
					left: 30px;
					bottom: 0px;
				}

				.btnArea {
					margin-top: 160rpx;
					//margin-left: 150rpx;
					display: flex;
					justify-content: center;
					position: fixed;
					right: 30px;
					bottom: 0px // text-align: center;
				}
			}
		}

		.infoBox {
			width: 100%;
			padding: 14rpx 30rpx;
			margin-top: 33rpx;
			border-radius: 20rpx;
			box-sizing: border-box;
			background: #fff;

			.singleInfo {
				width: 100%;
				box-sizing: border-box;
				padding: 20rpx 0;
				display: flex;
				align-items: center;
				justify-content: space-between;
				border-bottom: 1rpx solid #ccc;

				.info {
					flex: 1;

					.desc {
						font-size: 26rpx;
						font-weight: 400;
						color: #222222;
					}

					.time {
						margin-top: 15rpx;
						font-size: 18rpx;
						font-weight: 400;
						color: #888888;
						display: flex;
						align-items: center;
					}
				}

				.val {
					width: 115rpx;
					height: 40rpx;
					border: 1rpx solid #DA2627;
					border-radius: 40rpx;
					text-align: center;
					font-size: 22rpx;
					font-weight: 400;
					color: #DA2627;
					line-height: 40rpx;
				}
			}
		}

		.writeBox {
			border: none;
			width: 0px;
			height: 0px;
			position: fixed
		}
	}
</style>